<!DOCTYPE html>
<html lang="pt-BR">
    <head>
        <?php
        session_start();
        include_once'bloco/head.php';
        include_once '../control/conexao.php';
        include_once '../control/valida_sessao.php';

        function __autoload($classe) {
            include_once"../model/{$classe}.class.php";
        }
        ?>
        <link href="bootstrap/css/morris.css" rel="stylesheet">
    </head>
    <body>      
        <div id="wrapper">
            <?php
            include_once'bloco/navbar.php';
            include_once '../control/valida_perfil.php';
            ?>
            <div id="page-wrapper">
                <?php include_once 'bloco/banner.php'; ?>                  
                <div class="row">
                    <div class=" panel panel-success">
                        <div class="panel-heading">
                            <p class="panel-title"><i class = "glyphicon glyphicon-th-large"></i> Cadastrar Perfil</p>
                        </div>
                        <div class="panel-body">
                            <div class="col-lg-12 ">
                                <form autocomplete="off" name="form_cadastra_perfil" method="post" action="../control/editar_perfil.php">
                                    <div class="row">
                                        <div class="col-md-4 col-md-offset-4">
                                            <div class="alert alert-success alert-dismissable">
                                                <table class="table table-condensed table-responsive">
                                                    <?php
                                                    $perfilDAO = new perfilDAO();
                                                    $perfil = $perfilDAO->consultar($_GET['id']);
                                                    ?>
                                                    <tr>
                                                        <td><strong>Nome:</strong></td>
                                                        <td><input type="text" name="nome" class="form-control" required="" value="<?php echo utf8_encode($perfil->perfil_nome) ?>"/></td>
                                                    </tr>                                                    
                                                </table>                                                
                                                <div align="center">
                                                    <input type="button" class="btn btn-inverse" value="Voltar" onclick="history.go(-1)"/>
                                                    <input type="submit" class="btn btn-success" value="Salvar"/>
                                                </div>
                                            </div>
                                        </div>                                       
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <?php
        include_once'bloco/scripts.php';
        ?>        
    </body>
</html>